<?php
/**
 * This controller using for process any ajax request
 */
class NewsController extends AppController {
	var $name = "News";
	var $uses = array('News');
	
	public function beforeFilter() {
		parent::beforeFilter();
		$this->CustomAuth->allow('index');
	}
	
	function index(){
		if ($this->params['requested']) {
			$newsArr = $this->News->getNews();
			return array($newsArr);
		}

		return $this->cakeError('error404');
	}

}